import React from 'react'
import { Swiper } from "antd-mobile";
import "./banner.less"
import { imgPre } from "../../../../request/http"

function banner(props) {
  let { banner } = props;
  return (
    <div className='banner'>
      <Swiper style={{ "--height": "4rem" }}>
        {banner.map((item) => {
          return (
            <Swiper.Item key={item.id}>
              <img src={imgPre + item.img} alt="" />
            </Swiper.Item>
          );
        })}
      </Swiper>
    </div>
  )
}

export default React.memo(banner);